﻿using project.B12.Model.BaseModel;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project.B12.Model.Models
{
    [SugarTable("TB_ResultReported")]
    [TenantAttribute("1")]
    public class Table_ResultReported : AggregateRootEntity
    {
        public Table_ResultReported()
        {
            _micResult = new Dictionary<string, string>();
        }

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        private string _plateType {  get; set; }
        [SugarColumn(IsNullable = true)]
        public string PlateType
        {
            get { return _plateType; }
            set
            {
                _plateType = value;
                this.RaisePropertyChanged();
            }
        }

        private string _plateId { get; set; }
        [SugarColumn(IsNullable = true)]
        public string PlateId
        {
            get { return _plateId; }
            set
            {
                _plateId = value;
                this.RaisePropertyChanged();
            }
        }

        private string _sampleId { get; set; }
        [SugarColumn(IsNullable = true)]
        public string SampleId
        {
            get { return _sampleId; }
            set
            {
                _sampleId = value;
                this.RaisePropertyChanged();
            }
        }

        private DateTime _loadTime { get; set; }
        [SugarColumn(IsNullable = true)]
        public DateTime LoadTime
        {
            get { return _loadTime; }
            set
            {
                _loadTime = value;
                this.RaisePropertyChanged();
            }
        }

        private string _bacterialName { get; set; }
        [SugarColumn(IsNullable = true)]
        public string BacterialName
        {
            get { return _bacterialName; }
            set
            {
                _bacterialName = value;
                this.RaisePropertyChanged();
            }
        }

        private bool _isSpecial { get; set; }
        [SugarColumn(IsNullable = false)]
        public bool IsSpecial
        {
            get { return _isSpecial; }
            set
            {
                _isSpecial = value;
                this.RaisePropertyChanged();
            }
        }

        private bool _isUpdate { get; set; }
        [SugarColumn(IsNullable = false)]
        public bool IsUpdate
        {
            get { return _isUpdate; }
            set
            {
                _isUpdate = value;
                this.RaisePropertyChanged();
            }
        }

        private Dictionary<string,string> _micResult { get; set; }
        [SugarColumn(IsNullable = true, IsJson = true)]
        public Dictionary<string, string> MicResult
        {
            get { return _micResult; }
            set
            {
                _micResult = value;
                this.RaisePropertyChanged();
            }
        }
    }
}
